package cn.cs.service;

import cn.cs.mapper.AgentUserForUserDBMapper;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@RestController
public class AgentUserForUserDBService {
    @Resource
    private AgentUserForUserDBMapper agentUserForUserDBMapper;
    @RequestMapping(value = "/getInvoiceInfo", method = RequestMethod.POST)
    Map<String,Object> getInvoiceInfo(@RequestBody Map<String, Object> levelPay){
        return agentUserForUserDBMapper.getInvoiceInfo(levelPay);
    }

    @RequestMapping(value = "/getAllAreaByPid", method = RequestMethod.POST)
    List<String> getAllAreaByPid(@RequestParam("agent_area") String agent_area){
        return agentUserForUserDBMapper.getAllAreaByPid(agent_area);
    }

    @RequestMapping(value = "/getseqOfCity", method = RequestMethod.POST)
    int getseqOfCity(){
        return agentUserForUserDBMapper.getseqOfCity();
    }

    @RequestMapping(value = "/getDevShops", method = RequestMethod.POST)
    List<Map<String,Object>> getDevShops(@RequestParam("code") String code){
        return agentUserForUserDBMapper.getDevShops(code);
    }

    @RequestMapping(value = "/getDevRepUsers", method = RequestMethod.POST)
    List<Map<String,Object>> getDevRepUsers(@RequestBody Map<String, Object> param){
        return agentUserForUserDBMapper.getDevRepUsers(param);
    }

    @RequestMapping(value = "/getNearShopByMap", method = RequestMethod.POST)
    Map<String,Object> getNearShopByMap(@RequestBody Map<String, Object> shop){
        return agentUserForUserDBMapper.getNearShopByMap(shop);
    }

    @RequestMapping(value = "/addNearShop", method = RequestMethod.POST)
    int addNearShop(@RequestBody Map<String, Object> shop){
        return agentUserForUserDBMapper.addNearShop(shop);
    }

    @RequestMapping(value = "/insertShopType", method = RequestMethod.POST)
    int insertShopType(@RequestBody Map<String, Object> typeMap){
        return agentUserForUserDBMapper.insertShopType(typeMap);
    }

    @RequestMapping(value = "/getPlatProList", method = RequestMethod.POST)
    List<Map<String,Object>> getPlatProList(@RequestBody Map<String, Object> param){
        return agentUserForUserDBMapper.getPlatProList(param);
    }
    @RequestMapping(value = "/getPlatInfo", method = RequestMethod.POST)
    Map<String,Object> getPlatInfo(@RequestParam("id") String id){
        return agentUserForUserDBMapper.getPlatInfo(id);
    }

    @RequestMapping(value = "/getProImageList", method = RequestMethod.POST)
    List<Map<String,Object>> getProImageList(@RequestParam("id")String id){
        return agentUserForUserDBMapper.getProImageList(id);
    }
    @RequestMapping(value = "/getCsPartInfoById", method = RequestMethod.POST)
    Map<String,Object> getCsPartInfoById(@RequestParam("parts_id")String parts_id){
        return agentUserForUserDBMapper.getCsPartInfoById(parts_id);
    }

    @RequestMapping(value = "/getCancelDay", method = RequestMethod.POST)
    String getCancelDay(){
        return agentUserForUserDBMapper.getCancelDay();
    }

    @RequestMapping(value = "/getAgentAreaLevel", method = RequestMethod.POST)
    Map<String,Object> getAgentAreaLevel(@RequestParam("id") String id){
            return agentUserForUserDBMapper.getAgentAreaLevel(id);
    }

    @RequestMapping(value = "/insertAgentInvoice", method = RequestMethod.POST)
    int insertAgentInvoice(@RequestBody Map<String, Object> invoiceMap){
        return agentUserForUserDBMapper.insertAgentInvoice(invoiceMap);
    }
}
